<% if user_signed_in? %>

<h3>STEP1>>Manage Users</h3>
<%= flash[:notice] %>

<%= form_for :account , :url => { :controller => "account", :action => "createProjectAccount" } do |f| %>

  <div><%= f.label :email %><br />
  <%= f.email_field :email %></div>

  <div><%= f.submit "Create" %></div>
<% end %>

<h3>STEP2>>Manage User Permissions</h3>
<%= select("projectAccount", "projectAccountID", @project.resources.collect{ |r| [r.name, r.id] }, {:prompt => 'Choose Resource...'} , onchange: "$('#lead_form').submit()") %>

<!---
<%= select("projectAccount", "projectAccountID", @project.users.collect{ |u| [u.email, u.id] }, {:prompt => 'Choose Account...'} , onchange: "$('#lead_form').submit()") %>
--!>
<%= form_for :account , :url => { :controller => "account", :action => "editAccountPermission" } do |f| %>

<% end %>
<%= render :partial => "account/newresource" %>

<% else %>
Please sign-in first
<% end %>